home *** CD-ROM | disk | FTP | other *** search
/ Supercompiler 1997 / SUPERCOMPILER97.iso / Delphi 3.0 / DATA.Z / delphi32.exe / RCDATA / OCXSOURCE < prev    next >
Encoding:
Text File  |  1997-01-30  |  1.3 KB  |  78 lines

  1. unit %A;
  2.  
  3. %H{ Version %J }
  4.  
  5. %Binterface
  6.  
  7. %I%Gtype
  8.  
  9. { Forward declarations }
  10. %C
  11.  
  12. implementation
  13.  
  14. %D
  15. end.
  16. |%N%A  %B = class(TOleControl)
  17.   private
  18. %C    FIntf: %O;
  19. %D  protected
  20.     procedure InitControlData; override;
  21.     procedure InitControlInterface(const Obj: IUnknown); override;
  22.   public
  23. %E    property ControlInterface: %O read FIntf;
  24. %F  published
  25. %H%I%J  end;
  26.  
  27. |procedure %B.InitControlData;
  28. const
  29. %Kbegin
  30.   ControlData := @CControlData;
  31. end;
  32.  
  33. procedure %B.InitControlInterface(const Obj: IUnknown);
  34. begin
  35.   FIntf := Obj as %O;
  36. end;
  37.  
  38. %L%M
  39. |%A %I.%B%C%D;
  40. begin
  41.   %JControlInterface.%B%K;
  42. end;
  43.  
  44. |function %I.Get_%B%L%D;
  45. begin
  46.   Result := ControlInterface.%B%K;
  47. end;
  48.  
  49. |procedure %I.Set_%B%M;
  50. begin
  51.   ControlInterface.%B%K := Value;
  52. end;
  53.  
  54. |procedure Register;
  55. begin
  56.   RegisterComponents('%E', [%F]);
  57.   RegisterNonActiveX([%F]);
  58. end;
  59. |%N  %P = %O;
  60.  
  61.   Co%P = class
  62.     class function Create: %O;
  63.     class function CreateRemote(const MachineName: string): %O;
  64.   end;
  65.  
  66. |class function Co%P.Create: %O;
  67. begin
  68.   Result := CreateComObject(Class_%P) as %O;
  69. end;
  70.  
  71. class function Co%P.CreateRemote(const MachineName: string): %O;
  72. begin
  73.   Result := CreateRemoteComObject(MachineName, Class_%P) as %O;
  74. end;
  75.  
  76. |
  77.  
  78.